//
//  SessionEndTimeTests.m
//  UnitTests
//
//  Created by Jiang on 2018/10/22.
//  Copyright © 2018 jiang. All rights reserved.
//

#import <XCTest/XCTest.h>

@interface SessionEndTimeTests : XCTestCase

@end

@implementation SessionEndTimeTests

- (void)testInitWithRightValues{
    SessionEndTime *time1 = [[SessionEndTime alloc] initWithEarlist:9 latest:9];
    XCTAssertEqual(time1.marginTime, 0);
    XCTAssertEqual(time1.earlistHour, 9);
    XCTAssertEqual(time1.latestHour, 9);
    
    SessionEndTime *time2 = [[SessionEndTime alloc] initWithEarlist:9 latest:12];
    XCTAssertEqual(time2.marginTime, 180);
    XCTAssertEqual(time2.earlistHour, 9);
    XCTAssertEqual(time2.latestHour, 12);
}


@end
